package b1.conifg
{
	public class AnimalClueConfig
	{
		//线索的类型索引
		public var clueIndex:int;
		//线索的所有可能枚举值
		public var clueValues:Array;
		//碰撞点
		public var hitPoints:Array;
		//显示点
		public var showPoints:Array;
		
		public function AnimalClueConfig(animalClueXML:XML)
		{
			clueIndex = parseInt(animalClueXML.clueIndex);
			var clueValueStrs:Array = animalClueXML.clueValues.split("/");
			clueValues = new Array();
			for (var i:int = 0; i < clueValueStrs.length; i++)
			{
				clueValues.push(parseInt(clueValueStrs[i]));
			} 
			hitPoints = new Array();
			for (i = 0; i < animalClueXML.hitPoint.length(); i++)
			{
				var hitPoint:HotPoint = new HotPoint(animalClueXML.hitPoint[i]);
				hitPoint.clueIndex = parseInt(animalClueXML.clueIndex);
				hitPoint.dropPossibility = parseFloat(animalClueXML.dropPossibility);
				hitPoints.push(hitPoint);
			}
			showPoints = new Array();
			for (i = 0; i < animalClueXML.showPoint.length(); i++)
			{
				var showPoint:HotPoint = new HotPoint();
				showPoint.clueIndex = parseInt(animalClueXML.clueIndex);
				showPoint.dropPossibility = parseFloat(animalClueXML.dropPossibility);
				var showPointStrs:Array = animalClueXML.showPoint[i].split(",");
				showPoint.imageIndex = parseInt(showPointStrs[0]);
				showPoint.x = parseFloat(showPointStrs[1]);
				showPoint.y = parseFloat(showPointStrs[2]);
				showPoint.r = parseFloat(showPointStrs[3]);
				showPoints.push(showPoint);
			}
		}

	}
}